

const getList = () => {
  // 这里可以从数据库读取数据了。
  const listData = [
    { id: 1, name: 'zhangsan', age: 19 },
    { id: 2, name: 'lisi', age: 18 },
  ];
  return Promise.resolve(listData);
}

const getDetail = (id) => {
  const data = { id: 1, name: 'zhangsan', age: 19 };
  return Promise.resolve(data);
}

module.exports = {
  getList,
  getDetail,
}